* process.c: Fix minor off-by-one issues in descriptor counts.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Aug 2013 14:17:25 +0000 (07:17 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 Aug 2013 14:17:25 +0000 (07:17 -0700)
commitaea4dc5551494c81f9476e7fe42300c58e8d3d27
tree7c5cace0fd0574d27d5b5a48696054921b426bdb
parent2141520994fc2160188801db68b78cf8c1dd5068
* process.c: Fix minor off-by-one issues in descriptor counts.

This shouldn't fix any real bugs, but it cleans up the code a bit.
(max_process_desc, max_input_desc): -1, not 0, means none.
All uses changed.
(delete_input_desc): New function.
(delete_write_fd, delete_keyboard_wait_descriptor): Use it.
(deactivate_process): Scan backwards when recomuting max_process_desc;
that should be faster.
(init_process_emacs): Initialize max_input_desc.
src/ChangeLog
src/process.c